It is frequently desirable to make comparisons of the magnitudes of two numbers in binary or a binary coded form. Digital data processing devices continually use such comparisons in the execution of programs where, for example, a branch to a routine or sub-routine is made within a program on the basis of whether a given number is higher or lower than another number.
Comparisons of this nature are frequently made with hardware comparators which usually are capable of providing a "greater than" or "less than" indication only, or such an indication with the addition of an equality indication. Therefore if a comparison such as "greater than or equal to" or "less than or equal to" is required, a series of operations must be performed to determine whether the numbers are equal, and then whether "greater than" or "less than", and the results of the comparisons are then logically combined to indicate the required full comparison.
In certain operations performed by digital computers, it is essential to perform a "greater than or equal to" or "less than or equal to" comparison with minimum delay and with the ability to switch rapidly between the two comparison modes.